<template >
  <div>
    <h1>数字：{{$store.state.num}}</h1>
    <button @click="act()">触发actions</button>
    <jd-son></jd-son>
  </div>
</template>
<script>
import jdSon from "./jdson.vue"
export default {
  name: "my",
  components: { jdSon },
  data () {
    return {}
  },
  methods: {
    act () {
      // 触发actions 修改state
      this.$store.dispatch("numActions", 20)
    }
  },
}
</script>
<style lang="less">
</style>